home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Apple Macintosh Developer Technical Support
- **
- ** Program: StatTextCDEF.c
- ** Written by: Eric Soldan
- **
- ** Copyright © 1992 Apple Computer, Inc.
- ** All rights reserved.
- */
-
-
-
- /*****************************************************************************/
-
-
-
- #ifndef __CONTROLS__
- #include <Controls.h>
- #endif
-
- #ifndef __FONTS__
- #include <Fonts.h>
- #endif
-
- #ifndef __MEMORY__
- #include <Memory.h>
- #endif
-
- #ifndef __TEXTEDIT__
- #include <TextEdit.h>
- #endif
-
-
-
- pascal long CStatTextCtl(short varCode, ControlHandle ctl, short msg, long parm);
-
-
-
- /*****************************************************************************/
-
-
-
- #pragma segment StatTextCDEF
- pascal long CStatTextCtl(short varCode, ControlHandle ctl, short msg, long parm)
- {
- Rect rct;
- WindowPtr curPort;
- short txFont, txSize;
- Style txFace;
-
- rct = (*ctl)->contrlRect;
-
- switch (msg) {
-
- case drawCntl:
- GetPort(&curPort);
- txFont = curPort->txFont;
- txFace = curPort->txFace;
- txSize = curPort->txSize;
- if (!(varCode & useWFont)) {
- TextFont(systemFont);
- TextFace(normal);
- TextSize(0);
- }
-
- HLock((Handle)ctl);
- TextBox((*ctl)->contrlTitle + 1, (*ctl)->contrlTitle[0], &rct, teFlushDefault);
- HUnlock((Handle)ctl);
-
- TextFont(txFont);
- TextFace(txFace);
- TextSize(txSize);
- break;
-
- case testCntl:
- break;
-
- case calcCRgns:
- case calcCntlRgn:
- if (msg == calcCRgns)
- parm &= 0x00FFFFFF;
- RectRgn((RgnHandle)parm, &rct);
- break;
-
- case initCntl:
- break;
-
- case dispCntl:
- break;
-
- case posCntl:
- break;
-
- case thumbCntl:
- break;
-
- case dragCntl:
- break;
-
- case autoTrack:
- break;
- }
-
- return(0);
- }
-
-
-
-